package com.lh.controller;

import com.alibaba.fastjson.JSONObject;
import com.lh.entity.table.TicketProblemInfoApproval;
import com.lh.service.TicketProblemInfoApprovalService;
import com.lh.utils.Answer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/TicketProblemInfoApproval")
public class TicketProblemInfoApprovalController {

    @Autowired
    private TicketProblemInfoApprovalService ticketProblemInfoApprovalService;

    @RequestMapping("/commitApproval")
    public Answer<Object> addTicketProblemInfo(@RequestBody JSONObject reqJson) {
        return  ticketProblemInfoApprovalService.commitApproval(reqJson);
    }

    @RequestMapping("/updateTicketProblemInfo")
    public Answer<Object> updateTicketProblemInfo(@RequestBody TicketProblemInfoApproval ticketProblemInfoApproval) {
        return  ticketProblemInfoApprovalService.updateTicketProblemInfo(ticketProblemInfoApproval);
    }

    @RequestMapping("/deleteDepartment")
    public Answer<Object> deleteDepartment(@RequestBody TicketProblemInfoApproval ticketProblemInfoApproval) {
        return  ticketProblemInfoApprovalService.deleteDepartment(ticketProblemInfoApproval);
    }
}
